public class ch04_3_Arrays {
    public static void main(String[] args) {
        int[] number = {70,80,31,37,10,1,48,60,33,80};
        int[] array = new int[number.length];
        int i,j,k,temp;
        for(i=0;i<number.length-1;i++) {
            for(j=i+1;j<number.length-i-1;j++) {
                if(number[j]<=number[i]) {
                    temp = number[j];
                    number[j] = number[i];
                    number[i] = temp;
                }
            }
        }
        for(k=0;k<number.length;k++) {
            System.out.printf("%d ",number[k]);
        }
        System.out.println();
        for(int m : number) {
            System.out.printf("%3d", m);
        }
        System.out.println();
    }
}
